<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首页</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script src="./js/menu_1.js" type="text/javascript"></script>
<script src="./slider/coin-slider.js" type="text/javascript"></script>
<script src="./slider/coin-slider.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="./css/menu_1.css" type="text/css" />
<link rel="stylesheet" href="./slider/coin-slider-styles.css" type="text/css" />
</head>
<body>
<?php
	require_once "common.php";
	@$art=new article();
	$item=$art->showArticle();
    $slider=$art->slideShow();
    $hotNews=$art->hotNews();
    @$part=new part();
    $menu=$part->showMenu();
 ?>
<div id="top"></div>
<div id="contenter">
<div id="coin-slider" style="margin:0 auto 0 auto;">
<?php for($s=0;$s<count($slider)-1;$s++){ ?>
    <a href="./content_1.php?pid=<?php echo $slider[$s][pid]; ?>&aid=<?php echo $slider[$s][aid]; ?>" target="_blank">
        <img <?php echo $slider[$s][pic]; ?>>
        <span><?php echo $slider[$s][title]; ?></span>
    </a>
<?php
}
?>
</div>
<script type="text/javascript">
    $(document).ready(function() {
        $('#coin-slider').coinslider({ width:800,navigation:true,dely:5000 });
    });
</script>
<!--new menu-->
<SCRIPT type=text/javascript>
$(document).ready(function() {	

	jQuery.jqsxfg51nav = function(jqsxfg51navhover) {
		$(jqsxfg51navhover).prepend("<span></span>"); 
		
		$(jqsxfg51navhover).each(function() { 
			var linkText = $(this).find("a").html(); 
			$(this).find("span").show().html(linkText); 
		}); 
		
		$(jqsxfg51navhover).hover(function() {	
			$(this).find("span").stop().animate({ 
				marginTop: "-40" 
			}, 250);
		} , function() { 
			$(this).find("span").stop().animate({
				marginTop: "0" 
			}, 250);
		});	
	};
	//下面是调用方法，一个页面也可以调用很多次
	$.jqsxfg51nav("#menu1 li");
	$.jqsxfg51nav("#menu2 li");
});
</SCRIPT>
<div id="menu2" type="float:left;border-radius:15px;">
<ul>
	<li><a href="./index.php"><?php echo "首页"; ?></a></li>
<?php for($i=1;$i<count($menu);$i++){ ?>
	<li><a href="./list_1.php?pid=<?php echo $menu[$i][pid]; ?>"><?php echo $menu[$i][part]; ?></a></li>
<?php } ?>
</ul>
<div class="cls"></div>
</div>
</ul>
<div>
<div id="sidebar">
	<div id="sidebartitle">热门推荐</div>
	<div id="side_content">
			<ul><?php for($i=0;$i<count($hotNews);$i++){ ?>
				<li><a href="./content_1.php?pid=<?php echo $hotNews[$i][pid]; ?>&aid=<?php echo $hotNews[$i][aid]; ?>">
                <?php 
                echo mb_substr($hotNews[$i][title],0,30,'utf-8');
                ?></a>
                </li>
                <?php } ?>
			</ul>
	</div>
</div>
	<div id="mainbox">
	<div id="maintitle">最新更新</div>
	<?php for($i=0;$i<10;$i++){ ?>
	<div class="main_item">
            <div class="item_cover">
			<?php $res=$art->pregMatch($item[$i][content]);echo $res[0];?>
            </div>
			<div class="item_body">
                <h3><a href="./content_1.php?pid=<?php echo $item[$i][pid]; ?>&aid=<?php echo $item[$i][aid]; ?>"><?php echo $item[$i][title]; ?></a></h3>
		        <p class="item_summary"><?php echo $item[$i][describe]; ?></p>
            </div>
		<div class="item_foot">发布时间：<?php echo $item[$i][time]?></div>
	</div>	
	<?php } ?>
	</div>
</div>
</body>
</html>
